﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Report_UnSendOrder : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            txtOrder.Attributes.Add("onclick", "SelectOrder('../')");
            BindData(0);
        }
    }

    private void BindData(int pageIndex)
    {
        DataSet ds = new BLL.ORDERDOC().GetUnSendOrder(txtOrder.Text, int.Parse(drpKS.SelectedValue), int.Parse(drpCS.SelectedValue));
        grdUnSend.PageIndex = pageIndex;
        grdUnSend.DataSource = ds.Tables[0];
        grdUnSend.DataBind();

    }

    protected void grdUnSend_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        BindData(e.NewPageIndex);
    }
    protected void btnSearch_Click(object sender, EventArgs e)
    {
        BindData(0);
    }
}
